// 通用文本省略 mixin
@mixin textEllipsis($lines: 1) {
  @if $lines == 1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  } @else {
    display: -webkit-box;
    -webkit-line-clamp: $lines;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.cardItem {
  min-height: 180px;
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 20px;
  border: 1px solid transparent;
  /* 阴影/一级 */
  box-shadow: 0px 1px 10px 0px rgba(122, 120, 150, 0.1);
  font-family: 'PingFang-Sim';
  background: #ffffff;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;

  &:hover {
    border-color: #6356EA;
    /* 阴影/二级 */
    box-shadow: 0px 4px 16px 0px rgba(134, 130, 191, 0.3);
  }

  .header {
    display: flex;
    gap: 12px;

    .title {
      font-family: "PingFang-Sim";
      font-size: 20px;
      font-weight: 500;
      line-height: 26px;
      letter-spacing: normal;
      color: #000000;

      @include textEllipsis(1);
    }

    .subTitle {
      font-family: PingFang SC;
      font-size: 14px;
      font-weight: normal;
      line-height: normal;
      letter-spacing: normal;
      color: #7F7F7F;
      
      @include textEllipsis(1);
    }
  }
  
  .content {
    height: 44px;
    font-family: "PingFang-Sim";
    font-size: 12px;
    font-weight: normal;
    line-height: 22px;
    text-align: justify; /* 浏览器可能不支持 */
    letter-spacing: normal;
    color: #7F7F7F;

    @include textEllipsis(2);
  }

  .footer {
    height: 24px;
    /* 自动布局 */
    display: flex;
    justify-content: space-between;
    padding: 0px;
    align-self: stretch;
    z-index: 1;

    .footer_left {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 7px;
      font-family: PingFang SC;
      font-size: 12px;
      font-weight: normal;
      line-height: 24px;
      display: flex;
      align-items: center;
      letter-spacing: normal;
      /* 颜色/文本中性色/辅助色（说明、标签） */
      color: #B5B5B5;
      
      .divider {
        display: inline-block;
        width: 1px;
        height: 6px;
        background: #E4EAFF;
        border-radius: 50%;
      }
    }

    .footer_right {
      flex-shrink: 0;
    }
  }
}